/**
 * Driver for card unit tests
 * Team 15, 3/12/14
 *
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h> 
#include <assert.h>
#include "rngs.h"
#include <math.h>
#include "randomCardUnitTests.h"
#include "fixedCardUnitTests.h"


int main(int argc, char** argv) {

    char * usage = "Usage: [all] or [cardName]\n"
            "cards include: adventurer, council room, feast, mine\n"
            "remodel, smithy, village, baron, steward, tribute"
            "tribute, treasuremap, cutpurse";
    
    if (argc == 2){
        //run all unit tests
        if (strcmp(argv[1], "all") == 0){
            char *lineString = "________________________________________________";

            fixedTestAdventurer(2);
            printf("%s\n", lineString);  
            //randomTestAdventurer();
            //printf("%s\n", lineString);  
            fixedTestCouncilRoom(2);
            printf("%s\n", lineString);
            //randomTestCouncilRoom();
            //printf("%s\n", lineString);     
            fixedTestGreatHall(2);
            printf("%s\n", lineString);   
            fixedTestVillage(2);
            printf("%s\n", lineString);
            //randomTestVillage();
            //printf("%s\n", lineString);
            fixedTestOutpost(2);
            printf("%s\n", lineString);
            fixedTestMine(2);
            printf("%s\n", lineString);  
            fixedTestFeast(2);
            printf("%s\n", lineString);
            fixedTestRemodel(2);
            printf("%s\n", lineString);
            fixedTestSteward(2);
            printf("%s\n", lineString);  

        }
        //run selected unit tests.
        else if (strcmp(argv[1], "adventurer") == 0){            
            fixedTestAdventurer(2);
            //randomTestAdventurer();
        }
        else if (strcmp(argv[1], "council_room") == 0){ //function complete
            fixedTestCouncilRoom(2);
            //randomTestCouncilRoom();
        }
        else if (strcmp(argv[1], "great_hall") == 0){
            fixedTestGreatHall(2);
        }
        else if (strcmp(argv[1], "mine") == 0){
            fixedTestMine(2);
        }
        else if (strcmp(argv[1], "remodel") == 0){
            fixedTestRemodel(2);
        }
        else if (strcmp(argv[1], "smithy") == 0){
            fixedTestSmithy(2);
        }
        else if (strcmp(argv[1], "village") == 0){
            fixedTestVillage(2);
            //randomTestVillage();
        }
        else if (strcmp(argv[1], "feast") == 0){
            fixedTestFeast(1);
        }        
        else if (strcmp(argv[1], "steward") == 0){
            fixedTestSteward(2);
        }
        else if (strcmp(argv[1], "outpost") == 0){
            fixedTestOutpost(2);
        }
        /*TBD
        else if (strcmp(argv[1], "tribute") == 0){
            //tribute
        }
        //TBD
        else if (strcmp(argv[1], "treasuremap") == 0){
            //treasuremap
        }
        //TBD
        else if (strcmp(argv[1], "cutpurse") == 0){
            //cutpurse
        }*/
        else{
            printf("%s", usage);
        }        
    }

    else {
        printf("%s", usage);
    }
    
    return 0;
}






